import argparse

exp_time = 10

class DeviceParser:
    def __init__(self):
        '''
            --app           Application name [showroom, skype, call]
            --exp_time      Time steps for learning
            --server_ip     Agent server IP
            --server_port   Agent server port
            --target_fps    Target FPS
            --pixel_ip      Pixel device IP for connecting device via adb
            --pixel_port    Pixel device port for connecting device via adb
        '''
        parser = argparse.ArgumentParser()
        parser.add_argument('--app', type=str, default='test', choices=['test', 'showroom', 'skype', 'call'], help="Application name for learning")
        # parser.add_argument('--target_fps', type=int, required=True, help="Target FPS")
        parser.add_argument('--exp_time', type=int, default=exp_time, help="Time steps for learning")
        parser.add_argument('--pixel_ip',   type=str, default='172.29.172.234', help="Pixel device IP for connecting device via adb")
        parser.add_argument('--pixel_port', type=str, help="Pixel device port for connecting device via adb")
        parser.add_argument('--server_ip', type=str, default='192.168.1.103', help="Agent server IP")
        parser.add_argument('--server_port', type=int, default=8702, help="Agent server port number")

        args = parser.parse_args()
        self.app = args.app
        self.exp_time = args.exp_time
        # target_fps = args.target_fps
        self.pixel_ip = args.pixel_ip
        self.pixel_port = args.pixel_port
        self.server_ip = args.server_ip
        self.server_port = args.server_port

class AgentParser:
    def __init__(self):
        '''
            --exp_time          Time steps for learning
            --port              Device port
            --target_fps        Target FPS
            --threshold_temp    Thermal threshold temperature
        '''
        parser = argparse.ArgumentParser()
        parser.add_argument('--exp_time', type=int, default=exp_time, help="Time steps for learning")
        parser.add_argument('--port', type=int, default=8702, help="Device communication port")
        parser.add_argument('--target_fps', type=int, default=30, help="Target FPS")
        parser.add_argument('--threshold_temp', type=int, default=60, help="Thermal threshold temperature")

        args = parser.parse_args()
        self.exp_time = args.exp_time
        self.port = args.port
        self.target_fps = args.target_fps
        self.threshold_temp = args.threshold_temp
